package cn.wsalix.shop.status;

public enum ProductEnum {
	edit("1", "修改"), onsell("2", "上架"), ready("3", "提交待审核"), unPass("3", "审核不通过"), undercarriage("4",
			"下架"), delete("6", "删除");// stockout("5", "缺货"),
	private String code;
	private String title;

	ProductEnum(String code, String title) {
		this.code = code;
		this.title = title;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public static ProductEnum findByCode(String code) {
		for (ProductEnum userKind : ProductEnum.values()) {
			if (userKind.getCode().equals(code)) {
				return userKind;
			}
		}
		return null;
	}

}
